/**   
* @Package com.app.open.sys.role.dao 
*/
package com.wlyy.bcwlw.sys.role.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.rework.joss.persistence.convention.BaseDao;
import com.wlyy.bcwlw.sys.role.entity.RoleDTO;

/**
 * @ClassName. RoleDAO
 * @Description. TODO
 * @author zhangyang
 * @date 2015年8月11日 下午3:26:03
 * @version V1.0
 */
@Repository
public class RoleDAO extends BaseDao<RoleDTO, String> {

	public List<RoleDTO> getRolesByAppId(List<String> appIds){
		return this.sqlSessionTemplate.selectList(getMapperMethodId("getRolesByAppId"), appIds);
	}
	
	public List<RoleDTO> queryRoleInfoByPermissionId(String permissionId){
		return this.sqlSessionTemplate.selectList(getMapperMethodId("queryRoleInfoByPermissionId"),permissionId);
	}
	
	public List<RoleDTO> queryRoleWithUrl(){
		return this.sqlSessionTemplate.selectList(getMapperMethodId("queryRoleWithUrl"));
	}
	
	public List<RoleDTO> findRoleByUserId(String userId){
		return this.sqlSessionTemplate.selectList(getMapperMethodId("findRoleByUserId"), userId);
	}
	
	
}
